
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
    
<div class="archive_info">
<h1>HTML <span class="color_h1">编辑器</span></h1>
<style>
img {
    width: 70%;
}
</style>
<hr/><h2>HTML 编辑器推荐</h2>
<p>可以使用专业的 HTML 编辑器来编辑 HTML，菜鸟教程为大家推荐几款常用的编辑器：</p>
<ul>
<li>VS Code：<a  rel="noopener noreferrer" target="_blank">https://code.visualstudio.com/</a></li>
<li>Sublime Text：<a  rel="noopener noreferrer" target="_blank">http://www.sublimetext.com/</a></li>
<li>在线编辑器：<a  rel="noopener noreferrer" target="_blank">https://c.runoob.com/front-end/61/</a></li>
</ul>
<p>你可以从以上软件的官网中下载对应的软件，按步骤安装即可。</p>
<p>接下来我们将为大家演示如何使用 VS Code 工具来创建 HTML 文件。 </p>
<hr/><h2>VS Code</h2>
<p>Visual Studio Code（简称 VS Code）是一个由微软开发，同时支持 Windows 、 Linux 和 macOS 等操作系统且开放源代码的代码编辑器，编辑器中内置了扩展程序管理的功能。</p>
<p>VS Code 安装教程参考：<a  rel="noopener" target="_blank">https://www.runoob.com/w3cnote/vscode-tutorial.html</a></p>
<h3>步骤 1: 新建 HTML 文件</h3>
<p>在 VS Code 安装完成后，选择" 文件(F)-&gt;新建文件(N) "，在新建的文件中输入以下代码：</p>
<div class="example">
<div class="example_code">
<div class="hl-main"><span class="hl-brackets">&lt;</span><span class="hl-code">!</span><span class="hl-var">DOCTYPE</span><span class="hl-code"> </span><span class="hl-var">html</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">html</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">head</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">meta</span><span class="hl-code"> </span><span class="hl-var">charset</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">utf-8</span><span class="hl-quotes">"</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">title</span><span class="hl-brackets">&gt;</span><span class="hl-code">菜鸟教程(runoob.com)</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">title</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">head</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">body</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">h1</span><span class="hl-brackets">&gt;</span><span class="hl-code">我的第一个标题</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">h1</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">p</span><span class="hl-brackets">&gt;</span><span class="hl-code">我的第一个段落。</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">p</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">body</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">html</span><span class="hl-brackets">&gt;</span></div>
</div>
</div>
<p>
<img decoding="async" src="https://www.runoob.com/wp-content/uploads/2013/06/EAD13C0B-0BE9-411E-8E2A-23600B0BEF9B.jpg"/></p>
<h3>步骤 2: 另存为 HTML 文件</h3>
<p>然后选择" 文件(F)-&gt;另存为(A) "，文件名为 runoob.html:</p>
<p>
<img decoding="async" src="https://www.runoob.com/wp-content/uploads/2013/06/vscode-save.png"/></p>
<p>当您保存 HTML 文件时，既可以使用 <span class="marked">.htm</span> 也可以使用 <span class="marked">.html</span> 扩展名。两者没有区别，完全根据您的喜好，我建议统一用 <span class="marked">.html</span>。</p>
<p>在一个容易记忆的文件夹中保存这个文件，比如 <strong>runoob</strong></p>
<h3>步骤 3: 在浏览器中运行这个 HTML 文件</h3>
<p>然后鼠标右击编辑器上的文件名，选择在默认浏览器打开（也可以其他的浏览器）:
</p>
<p>
<img decoding="async" src="https://www.runoob.com/wp-content/uploads/2013/06/D9121495-3CB2-432F-82BE-6EB8828D0022.jpg"/></p>
<blockquote><p><strong>注：</strong>vscode 中使用浏览器打开 html 文件需要 安装 <strong>"open in browser"</strong> 扩展。</p></blockquote>
<p>运行显示结果类似如下:</p>
<p>
<img decoding="async" src="https://www.runoob.com/wp-content/uploads/2013/06/html3.jpg"/></p>
<blockquote>
<p>
VS Code 和 Sublime Text 还可以配合 Emmet 插件来提高编码速度。
</p><p>Emmet 官网：<a  rel="noopener noreferrer" target="_blank">http://emmet.io/</a></p>
</blockquote>
<div class="scroll-top"><a >返回顶部</a></div>
</div>

    </body>
    </html>
    